<div class="coverage-wrapper coverage-json-wrapper pb-5">
    <div class="row my-3">
        <div class="col-2">{{ ts('PART') }}</div>
        <div class="col-2">{{ ts('ROLLNUMBER') }}</div>
        <div class="col-2">{{ ts('LENGTH') }}</div>
        <div class="col-2">{{ ts('FILMTYPE') }}</div>
        <div class="col-2">{{ ts('FILMWIDTH') }}</div>
        <div class="col-2">{{ ts('PRECUTORMANUAL') }}</div>
        <div class="col"></div>
    </div>
    <div class="coverage-list"></div>
    @empty(@$is_precut)
        <div class="mt-5">
            <button type="button" class="btn btn-info addmore">{{ ts('addmore') }}</button>
        </div>
    @else
        <div class="text-danger mt-5">专车专用套件不允许修改安装部位</div>
    @endif
</div>

<script>
    @php
    #$oldPart = ['part'=>old('part[]'), 'roll_number'=>old('roll_number[]'), 'length'=>old('length[]'), 'film_type_id'=>old('film_type_id[]'), 'width'=>old('width[]')];
    $oldPart = ['part'=>old('part'), 'roll_number'=>old('roll_number'), 'length'=>old('length'), 'film_type_id'=>old('film_type_id') ?: [], 'width'=>old('width') ?: []];
    @endphp
    window.coverage_items_obj = @json(@$coverages);
    window.coverage_items_arr = @json($oldPart);
    window.coverage_items_readonly = {{ @$is_precut ? '1' : '0' }};
</script>